<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
    <meta charset="UTF-8">
    <title>自定义试题</title>
    <link rel="stylesheet" href="/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/css/admin/custom.css">
</head>
<body onload="loadPage()">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header"></div>
    <div id="customer-paper-container">
        <div class="test-container">
            <div class="layui-input-block">
                <button type="button" class="layui-btn layui-btn-radius layui-btn-primary"
                        onclick="returnToTest()">
                    返回试题管理
                </button>
            </div>
            <form class="layui-form" action="javascript:void(0);">
                <div class="test-title">
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="text" name="testTitle" placeholder="请输入试题名"
                                   class="layui-input layui-input-radius"
                                   title="" lay-verify="required" autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="class-type">
                    <div class="layui-form-item">
                        <div class="layui-input-block select-class">
                            <select name="subjectClazz" title="" lay-verify="required" autocomplete="off">
                                <option value="">请选择所属科目</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="text" name="singleScale" placeholder="请输入单选题分值"
                                   class="layui-input layui-input-radius"
                                   title="" lay-verify="required" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="text" name="multiScale" placeholder="请输入多选题分值"
                                   class="layui-input layui-input-radius"
                                   title="" lay-verify="required" autocomplete="off">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <input type="text" name="restrict" placeholder="请输入考试时间(单位/分)"
                                   class="layui-input layui-input-radius" title="" lay-verify="required"
                                   autocomplete="off">
                        </div>
                    </div>
                </div>
                <div class="test-content">
                    <div class="layui-card">
                        <div class="layui-card-header">
                            <label class="layui-form-label">第<span class="question-no">1</span>题</label>
                            <div class="layui-input-block">
                                <input type="text" name="question" placeholder="请输入题目内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <i class="layui-icon layui-icon-delete" onclick="delQuestion($(this));"></i>
                            </div>
                            <span class="ques-type">1</span>
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="radio" name="answer1" value="1" title="" checked>
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="radio" name="answer1" value="2" title="">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="radio" name="answer1" value="3" title="">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="radio" name="answer1" value="4" title="">
                                <i class="layui-icon layui-icon-delete" onclick="delOption($(this));"></i>
                            </div>
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn layui-btn-radius layui-btn-primary"
                                        onclick="addOption($(this));">
                                    添加选项
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="layui-card">
                        <div class="layui-card-header">
                            <label class="layui-form-label">第<span class="question-no">2</span>题</label>
                            <div class="layui-input-block">
                                <input type="text" name="question" placeholder="请输入题目内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <i class="layui-icon layui-icon-delete" onclick="delQuestion($(this));"></i>
                            </div>
                            <span class="ques-type">2</span>
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="checkbox" name="answer2" value="1" title="" lay-skin="primary">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="checkbox" name="answer2" value="2" title="" lay-skin="primary">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="checkbox" name="answer2" value="3" title="" lay-skin="primary">
                            </div>
                            <div class="layui-input-block">
                                <input type="text" name="option" placeholder="请输入选项内容"
                                       class="layui-input layui-input-radius"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="checkbox" name="answer2" value="4" title="" lay-skin="primary">
                                <i class="layui-icon layui-icon-delete" onclick="delOption($(this));"></i>
                            </div>
                            <div class="layui-input-block">
                                <button type="button" class="layui-btn layui-btn-radius layui-btn-primary"
                                        onclick="addOption($(this));">
                                    添加选项
                                </button>
                            </div>
                        </div>
                    </div>
                    <div class="layui-card">
                        <div class="layui-card-header">
                            <label class="layui-form-label">第<span class="question-no">3</span>题</label>
                            <div class="layui-input-block">
                                <input type="text" name="question" placeholder="请输入题目内容"
                                       class="layui-input layui-input-radius open"
                                       title="" lay-verify="required" autocomplete="off">
                                <input type="text" name="openScale" placeholder="请输入题目分值"
                                       class="layui-input layui-input-radius open"
                                       title="" lay-verify="required" autocomplete="off">
                                <i class="layui-icon layui-icon-delete" onclick="delQuestion($(this));"></i>
                            </div>
                            <span class="ques-type">3</span>
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-input-block">
                                <textarea name="answer3" placeholder="请输入参考答案" class="layui-textarea"
                                          title="" lay-verify="required" autocomplete="off"></textarea>
                            </div>
                        </div>
                    </div>
                    <div class="add-question">
                        <button type="button" class="layui-btn layui-btn-radius layui-btn-primary"
                                onclick="addQuestion($(this));">
                            添加题目
                        </button>
                    </div>
                </div>
                <div class="create">
                    <button type="button" class="layui-btn layui-btn-radius layui-btn-normal" lay-submit
                            lay-filter="create">
                        创建试题
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
<script src="/js/jquery.min.js"></script>
<script src="/plugins/layui/layui.js"></script>
<script src="/js/public.js"></script>
<script src="/js/admin/customPaper.js"></script>
</body>
</html>